﻿using System.ComponentModel;
using System.Windows;
using Nutshell.DHVCS.Business;

namespace Nutshell.DHVCS.WPFUI
{
        /// <summary>
        ///         MainWindow.xaml 的交互逻辑
        /// </summary>
        public partial class MainWindow
        {
                private readonly GlobalManager _gm = GlobalManager.Instance;


                public MainWindow()
                {
                        InitializeComponent();
                }

                private void Window_OnLoaded(object sender, RoutedEventArgs e)
                {
                        _gm.Start();

                        MetroWindow.DataContext = _gm;
                }


                private void MainWindow_OnClosing(object sender, CancelEventArgs e)
                {
                        _gm.Stop();
                }
        }
}
